Skip to content

[CMake] Fix relocatable install patch command with Xcode generator - #6444

Open
fredroy wants to merge 1 commit into
sofa-framework:masterfrom
fredroy:fix_xcode_relocatable_install
Open

fredroy wants to merge 1 commit into
sofa-framework:masterfrom
fredroy:fix_xcode_relocatable_install

Conversation

@fredroy

@fredroy fredroy commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

Something I would not have never solved by myself 🤖....

At the first build (just after cmake's configuration/generation), XCode (and not ninja) was failing with a weird error on some plugins (just discovered it was with plugins with a dot 👀). But it was compiling fine if you do a second build 🤪

Makefile/Ninja unescape "$$" to "$" before running the shell, Xcode does not. The leftover "$$" made the shell expand ${CMAKE_INSTALL_PREFIX...} itself:
- plugins with a dot in their name (e.g. SoftRobots.Inverse) failed with "bad substitution" on the first build after each configure (set -e in the Xcode script phase defeats the trailing "|| true");
- other plugins got a broken cmake_install.cmake patch (prefix set to "$").

Use a single "$" when the generator is Xcode, as already done for Visual Studio.

By submitting this pull request, I acknowledge that
I have read, understand, and agree SOFA Developer Certificate of Origin (DCO).


Reviewers will merge this pull-request only if

  • it builds with SUCCESS for all platforms on the CI.
  • it does not generate new warnings.
  • it does not generate new unit test failures.
  • it does not generate new scene test failures.
  • it does not break API compatibility.
  • it is more than 1 week old (or has fast-merge label).

Makefile/Ninja unescape "$$" to "$" before running the shell, Xcode does not.
The leftover "$$" made the shell expand ${CMAKE_INSTALL_PREFIX...} itself:
- plugins with a dot in their name (e.g. SoftRobots.Inverse) failed with
  "bad substitution" on the first build after each configure (set -e in the
  Xcode script phase defeats the trailing "|| true");
- other plugins got a broken cmake_install.cmake patch (prefix set to "$").

Use a single "$" when the generator is Xcode, as already done for Visual Studio.
@fredroy fredroy added pr: fix Fix a bug pr: status to review To notify reviewers to review this pull-request pr: AI-aided Label notifying the reviewers that part or all of the PR has been generated with the help of an AI labels Nov 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr: AI-aided Label notifying the reviewers that part or all of the PR has been generated with the help of an AI pr: fix Fix a bug pr: status to review To notify reviewers to review this pull-request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant